/*
 * 作者: 侯晓宇
 * 时间: 2017-01-11 
 * 说明：
 * Copyright (c) 2016-2017 中研沃兮
 */
define(function(require) {

	require("jquery");
	var appInfo = require('app/AppInfo');
	var action = require("./action/IndexCatalogFrmAction");
	var c = require('app/utils/CommonUtils');
	var s = {};

	action.fetchInHeaderMode();

	//初始化头部刷新
	api.setRefreshHeaderInfo({
		visible: true,
		loadingImg: 'widget://res/pullrefresh/pullpoint.png',
		bgColor: '#ccc',
		textColor: '#fff',
		textDown: '下拉刷新...',
		textUp: '松开刷新...',
		showTime: true
	}, function(ret, err) {
		action.fetchInHeaderMode();
	});

	//初始化底部刷新
	api.addEventListener({
		name: 'scrolltobottom',
		extra: {
			threshold: 500 //设置距离底部多少距离时触发，默认值为0，数字类型
		}
	}, function(ret, err) {
		action.fetchInFooterMode();
	});



	return;
});